{% extends 'order/order_base.html' %}
{% block title %}
    新增订单
{% endblock %}
{% block content %}
     <ol class="breadcrumb">
      <li><a href="#">首页</a></li>
      <li><a href="#">订单管理</a></li>
      <li class="active">新增订单</li>
    </ol>

    <form action="{{ url_for("order.index") }}" method="POST">
        <table class="table table-bordered">
            <tr>
                <td>选择桌子</td>
                <td colspan="2">
                      <select class="form-control" name="desk_no">
                        {% for desk in desks %}
                            <option value="{{ desk.desk_no }}">{{ desk.desk_name }}</option>
                        {% endfor %}
                      </select>
                </td>
            </tr>
            {% for dish_type in dish_types %}
                <tr>
                    <td colspan="3"><h3 class="center"> {{ dish_type.dish_type_name }}</h3></td>
                    {% for dish in dish_type.dishes %}
                        <tr>
                            <td>{{ dish.dish_name }}</td>
                            <td>{{ dish.price }}元</td>
                            <td><input type="checkbox" name="dish_nos" value="{{ dish.dish_no }}"></td>
                        </tr>
                    {% endfor %}
                </tr>
            {% endfor %}
            <tr>
                <td colspan="3">
                    <button type="submit" class="btn btn-primary">提交</button>
                </td>
            </tr>
        </table>
    </form>
{% endblock %}